﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace SanguoSharp
{
	public interface IServer
	{
		/// <summary>
		/// Gets the name of the server.
		/// </summary>
		string Name { get; }
		/// <summary>
		/// Gets the description of the server.
		/// </summary>
		string Description { get; }

		/// <summary>
		/// Gets the major version of the interface implementation on the server.
		/// </summary>
		int InterfaceVersionMajor { get; }
		/// <summary>
		/// Gets the minor version of the interface implementation on the server.
		/// </summary>
		int InterfaceVersionMinor { get; }
		
		/// <summary>
		/// Gets the collection of the sessions currently hosted on the server.
		/// </summary>
		ReadOnlyCollection<ISession> Sessions { get; }
		
		/// <summary>
		/// Creates a new session on the server.
		/// </summary>
		/// <param name="sessionData">
		/// The <see cref="CreateSessionData"/> containing the information about the session.
		/// </param>
		/// <param name="playerData">
		/// The <see cref="CreatePlayerData"/> containing the information about the creator.
		/// </param>
		/// <param name="listener">
		/// The <see cref="PlayerEventListener"/> of the creator.
		/// </param>
		void CreateSession(CreateSessionData sessionData, CreatePlayerData playerData, IPlayerEventListener listener);

		ISession GetSession(int id);
	}
}
